﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using QuickTweet.Common;
using System.Windows.Input;
using QuickTweet.Common.Commanding;
using System.Windows.Data;
using System.Windows;
using System.Reflection;
using System.Diagnostics;
using System.Runtime.InteropServices;

namespace QuickTweet.ViewModels
{
    public class AboutViewModel : ViewModelBase
    {
        #region Properties

        public ICommand NavigateCommand { get; private set; }

        public string ApplicationName
        {
            get
            {
                return "Quick Tweet";
            }
        }

        public string ApplicationVersion
        {
            get
            {
                Assembly assembly = Assembly.GetExecutingAssembly();
                AssemblyName name = new AssemblyName(assembly.FullName);
                return "Version: " + name.Version.ToString(3);
            }
        }

        #endregion

        public AboutViewModel()
        {
            NavigateCommand = new DelegateCommand(arg =>
            {
                try { Process.Start(arg.ToString()); }
                catch { }
            });
        }
    }
}
